/*
 * main.cpp
 *
 *  Created on: 07.06.2014
 *      Author: Zejing Li
 */

#include <string>
#include <iostream>
#include "converter/roman_numeral_converter.h"

using namespace std;

/* convert an arbitrary Arabic numeral "arabicNumeral" to the corresponding
 * Roman numeral
 */
int main(int argc, const char* argv[]) {

	if (argc > 1 && (string(argv[1]) == "-h" || string(argv[1]) == "--help")) {
		cout << "Help:" << endl;
		cout << "	Using this program, we can convert an arbitrary Arabic numeral to the corresponding Roman numeral." << endl;
		cout << "	The star symbol * means that the character before * is multiplied by 1000.	" << endl;
		cout << "	To exit the program please type 0." << endl;
	} else {
		int arabicNumeral;
		cout << "Please enter a positive integer value: ";
		cin >> arabicNumeral;

		while (arabicNumeral != 0) {
			a::RomanNumeralConverter converter;
			string roman = converter.convert(arabicNumeral);
			cout << "Result: " << roman << endl;
			cout << "Please enter a positive integer value: ";
			cin >> arabicNumeral;
		}

	}

	return 0;
}

